<?
include_once('clogin.inc.php');
include_once('admin_head.php');

if ($_SESSION["adminid"] !=1 ){
		showmsg($_SESSION["username"]."你没有权限！你的权限级别是：".$_SESSION["adminid"],'失败','return','返回');
}

$uid = $_SESSION["uid"];
$model_name ='系统';

if ($_POST){
	$settings=array("system_um",
"system_um_time",
"mail_tag",
"mail_from",
"mail_server",
"mail_port",
"mail_user",
"mail_password",
"mail_type"
);
	foreach($_POST as $k=>$v){
		if(in_array($k,$settings))
		cores::set_system_config($k,$v);
	}
}
$_SYSTEM  = cores::get_system_config();
$_var['_system']=$_SYSTEM;

?>


	<form id="form1" name="form1" method="post" action="/admin/admin_system.php">
	    <table width="600" border="0" cellpadding="0" cellspacing="0">
	        <tr>
	            <td></td>
            </tr>
	        <tr>
	            <td></td>
            </tr>
	        <tr>
	            <td class="H10"></td>
            </tr>
	        <tr>
	            <td><div id="TiServerTemplateControl1">
	                <table border="0" cellspacing="0" cellpadding="0" class="DataTableCaption">
	                    <tr>
	                        <td><span class="CaptionText">System manager: </span></td>
	                        <td><table border="0" cellspacing="0" cellpadding="0" align="right">
	                            <tr>
	                                <td><img src="../../../images/contenttitleheadf.gif" width="3" height="30" /></td>
	                                <td class="DisplayOption">&nbsp;</td>
	                                <td>&nbsp;</td>
	                                </tr>
	                            </table></td>
                        </tr>
                    </table>
	                <table border="0" cellpadding="2" cellspacing="0" class="DataTable" width="100%">
	                    <tbody>
	                        <!--               <tr>
                  <td class="SectionHead">数据备份</td>
                </tr>


                <tr class="">
                  <td class="TAC">
                  <div id="sys_data_backup" style="display:none" class="sys_info"></div><input type="button" id="btnData_backupSubmit" name="btnData_backupSubmit" value="开始备份" onclick="submit_from('data_backup')"  />
                  <input type="button" id="btnData_backupSubmit2" name="btnData_backupSubmit2" value="查看备份" onclick="submit_from('data_backup_show')"  /></td>
                </tr>
                <tr class="">
                  <td class="TAC">&nbsp;</td>
                </tr>-->
	                        <tr>
	                            <td class="SectionHead">邮件发送设置<a name="anchor_mail_setting" id="anchor_mail_setting"></a>　</td>
                            </tr>
	                        <tr class="">
	                            <td class="TAC"><div id="sys_mail_setting" style="display:none" class="sys_info"></div>
	                                <table width="100%" border="0">
	                                    <tr>
	                                        <th scope="row">邮件标识</th>
	                                        <td><input name="mail_tag" value="<?=$_var['_system']['mail_tag']?>" /></td>
                                        </tr>
	                                    <tr>
	                                        <th scope="row">发信人 </th>
	                                        <td><input name="mail_from" value="<?=$_var['_system']['mail_from']?>" /></td>
                                        </tr>
	                                    <tr>
	                                        <th scope="row">发信方式</th>
	                                        <td><label>
	                                            <input type="radio" name="mail_type" value="2"  <?=set_radio($_var['_system']['mail_type'],2)?>     />
	                                            smtp方式</label>
	                                            <label>
	                                                <input type="radio" name="mail_type" value="1" <?=set_radio($_var['_system']['mail_type'],1)?> />
	                                                PHP方式</label></td>
                                        </tr>
	                                    <tr>
	                                        <th scope="row">邮件服务器</th>
	                                        <td><input name="mail_server" value="<?=$_var['_system']['mail_server']?>" /></td>
                                        </tr>
	                                    <tr>
	                                        <th scope="row">端口 </th>
	                                        <td><input name="mail_port" value="<?=$_var['_system']['mail_port']?>" /></td>
                                        </tr>
	                                    <tr>
	                                        <th scope="row">发件人邮件地址 </th>
	                                        <td><input name="mail_user" value="<?=$_var['_system']['mail_user']?>" /></td>
                                        </tr>
	                                    <tr>
	                                        <th scope="row">密码 </th>
	                                        <td><input name="mail_password" value="<?=$_var['_system']['mail_password']?>" /></td>
                                        </tr>
	                                    <tr>
	                                        <th scope="row">测试收件人</th>
	                                        <td><input name="mail_test" value="" /></td>
                                        </tr>
                                    </table>
	                                <p>
	                                    <input type="submit" id="btnSettingSubmit" name="btnSettingSubmit" value="更新" onclick="submit_from('mail_setting')"   />
                                    </p></td>
                            </tr>
	                        <tr class="">
	                            <td class="TAC">&nbsp;</td>
                            </tr>
	                        <tr class="">
	                            <td class="TAC">&nbsp;</td>
                            </tr>
                        </tbody>
                    </table>
	                </div></td>
            </tr>
	        <tr>
	            <td class="H10"></td>
            </tr>
	        <tr>
	            <td class="H10"></td>
            </tr>
        </table>
	</form>
</body>
</html>